home *** CD-ROM | disk | FTP | other *** search
- function setStartScreen()
- {
- header_op.textColor = _root.parseColor(_root.submenu_header_color);
- header_op.text = _root.my_bm_label;
- subheader_op.textColor = _root.parseColor(_root.submenu_subheader_color);
- setRGB(header_line_mc,_root.parseColor(_root.seperator_line_color));
- header_line_mc._alpha = Number(_root.seperator_line_alpha);
- info_mc.header_op.textColor = _root.parseColor(_root.teaser_header_color);
- info_mc.header_op.text = _root.my_bm_teaser_info_label;
- info_mc.subheader_op.textColor = _root.parseColor(_root.teaser_subheader_color);
- info_mc.bm_header_op.textColor = _root.parseColor(_root.teaser_subheader2_color);
- info_mc.bm_text_op.textColor = _root.parseColor(_root.teaser_text_color);
- info_mc.bm_time_op.textColor = _root.parseColor(_root.teaser_text_color);
- info_mc.bm_alert_op.textColor = _root.parseColor(_root.teaser_text_color);
- setRGB(info_mc.info_v_line_mc,_root.parseColor(_root.seperator_line_color));
- info_mc.info_v_line_mc._alpha = Number(_root.seperator_line_alpha);
- setRGB(info_mc.info_line_mc,_root.parseColor(_root.seperator_line_color));
- info_mc.info_line_mc._alpha = Number(_root.seperator_line_alpha);
- setRGB(info_mc.footer_line_mc,_root.parseColor(_root.seperator_line_color));
- info_mc.footer_line_mc._alpha = Number(_root.seperator_line_alpha);
- setRGB(info_mc.bm_header_bg_mc,_root.parseColor(_root.form_highlight_color));
- info_mc.bm_header_bg_mc._alpha = _root.form_highlight_alpha;
- setRGB(info_mc.bm_text_bg_mc,_root.parseColor(_root.form_highlight_color));
- info_mc.bm_text_bg_mc._alpha = _root.form_highlight_alpha;
- legende_mc.text1_op.autoSize = true;
- legende_mc.text1_op.textColor = _root.parseColor(_root.teaser_subheader_color);
- legende_mc.text1_op.text = _root.my_bm_legend_desc;
- legende_mc.text2_op.autoSize = true;
- legende_mc.text2_op.textColor = _root.parseColor(_root.teaser_subheader_color);
- legende_mc.text2_op.text = _root.my_bm_pd_legend_desc;
- if(_root.my_bm_show_legend == "false")
- {
- legende_mc._visible = false;
- }
- else
- {
- if(v2b_so.data.my_bm_show_predefined_bm == undefined || v2b_so.data.my_bm_show_predefined_bm == true)
- {
- v2b_so.data.my_bm_show_predefined_bm = true;
- v2b_so.flush();
- show_predefined_bm = true;
- }
- else
- {
- show_predefined_bm = false;
- legende_mc.check_box_mc.checked_mc._visible = false;
- }
- legende_mc.check_box_mc.onRelease = pdCheckBox_onClick;
- }
- }
- function pdCheckBox_onClick()
- {
- if(show_predefined_bm)
- {
- show_predefined_bm = false;
- legende_mc.check_box_mc.checked_mc._visible = false;
- v2b_so.data.my_bm_show_predefined_bm = false;
- }
- else
- {
- show_predefined_bm = true;
- legende_mc.check_box_mc.checked_mc._visible = true;
- v2b_so.data.my_bm_show_predefined_bm = true;
- }
- v2b_so.flush();
- renderBookmarks();
- }
- function renderBookmarks()
- {
- removeBookmarks();
- var _loc10_ = 16;
- var _loc15_ = 0;
- bookmark_holder_mc._visible = false;
- i = 0;
- while(i < video_array.length)
- {
- var _loc8_ = undefined;
- if(video_array[i].movie.lastIndexOf("/") > -1)
- {
- _loc8_ = video_array[i].movie.substring(video_array[i].movie.lastIndexOf("/") + 1,video_array[i].movie.lastIndexOf("."));
- }
- else
- {
- _loc8_ = video_array[i].movie.substring(0,video_array[i].movie.lastIndexOf("."));
- }
- var _loc9_ = _loc8_ + "_data";
- var _loc5_ = new Array();
- if(v2b_so.data[_loc9_].bookmarks != undefined && v2b_so.data[_loc9_].bookmarks.length > 0)
- {
- _loc5_ = v2b_so.data[_loc9_].bookmarks;
- }
- if(show_predefined_bm)
- {
- if(_root.pd_bm_object[_loc8_] != undefined && _root.pd_bm_object[_loc8_].length > 0)
- {
- _loc5_ = _loc5_.concat(_root.pd_bm_object[_loc8_]);
- _loc5_.sortOn("sec",Array.NUMERIC);
- }
- }
- if(_loc5_.length > 0)
- {
- var _loc6_ = bookmark_holder_mc.attachMovie("headline_mc","headline" + i,bookmark_holder_mc.getNextHighestDepth());
- _loc6_.mc_type = "headline";
- _loc6_._x = 0;
- _loc6_._y = _loc10_;
- _loc6_.original_text = video_array[i].movie_name;
- _loc6_.chapter_op.textColor = _root.parseColor(_root.index_color);
- _loc6_.chapter_op.text = video_array[i].chapter_id;
- if(_loc6_.chapter_op.textWidth + 2 > _loc6_.chapter_op._width)
- {
- _loc6_.chapter_op.autoSize = true;
- _loc6_.text_op._x = Math.ceil(_loc6_.chapter_op._x + _loc6_.chapter_op._width + 3);
- }
- _loc6_.text_op._width = max_content_width - _loc6_.text_op._x;
- _loc6_.text_op.textColor = _root.parseColor(_root.submenu_color);
- _loc6_.text_op.text = _loc6_.original_text;
- _loc6_.text_op.stringCutter_advanced(" ...");
- var _loc11_ = 0;
- var _loc12_ = 0;
- var _loc4_ = 0;
- while(_loc4_ < _loc5_.length)
- {
- _loc15_ = _loc15_ + 1;
- _loc10_ += bm_y_dis;
- var _loc3_ = bookmark_holder_mc.attachMovie("bookmark_mc","bookmark" + i + "-" + _loc4_,bookmark_holder_mc.getNextHighestDepth());
- _loc3_.mc_type = "bookmark";
- _loc3_.movie_id = i;
- if(_loc5_[_loc4_].pd == true)
- {
- _loc3_.pd = true;
- _loc3_.array_id = _loc12_;
- _loc3_.array_name = _loc8_;
- _loc12_ = _loc12_ + 1;
- _loc3_.edit_btn_mc._visible = false;
- _loc3_.delete_btn_mc._visible = false;
- setRGB(_loc3_.bm_icon_mc,3407871);
- }
- else
- {
- _loc3_.pd = false;
- _loc3_.array_id = _loc11_;
- _loc3_.array_name = _loc9_;
- _loc11_ = _loc11_ + 1;
- }
- setRGB(_loc3_.bg_mc,_root.parseColor(_root.submenu_rollover_color));
- _loc3_.bg_mc._alpha = 0;
- setRGB(_loc3_.edit_btn_mc.bg_mc,_root.parseColor(_root.submenu_rollover_color));
- _loc3_.edit_btn_mc.bg_mc._alpha = 0;
- setRGB(_loc3_.delete_btn_mc.bg_mc,_root.parseColor(_root.submenu_rollover_color));
- _loc3_.delete_btn_mc.bg_mc._alpha = 0;
- _loc3_._x = 0;
- _loc3_._y = _loc10_;
- setBookmarkWidth(_loc3_,max_content_width,false);
- _loc3_.original_text = _loc5_[_loc4_].description;
- _loc3_.sec = _loc5_[_loc4_].sec;
- _loc3_.text_op.textColor = _root.parseColor(_root.submenu_color);
- _loc3_.text_op.text = _loc3_.original_text;
- _loc3_.text_op.stringCutter_advanced(" ...");
- _loc3_.date_op.textColor = _root.parseColor(_root.submenu_color);
- if(_loc5_[_loc4_].bm_date != undefined)
- {
- _loc3_.date_op.text = _loc5_[_loc4_].bm_date;
- }
- else
- {
- _loc3_.date_op.text = "";
- }
- _loc3_.time_op.textColor = _root.parseColor(_root.submenu_color);
- _loc3_.time_op.text = createTimeString(_loc5_[_loc4_].sec);
- _loc3_.bg_mc.onRelease = function()
- {
- _root.killToolTip();
- gotoBookmark(this._parent.movie_id,this._parent.array_name,this._parent.array_id,this._parent.pd);
- };
- _loc3_.bg_mc.onRollOver = _loc3_.bg_mc.onDragOver = function()
- {
- if(!editing_active)
- {
- this._parent.bg_mc._alpha = Number(_root.submenu_rollover_alpha);
- this._parent.text_op.textColor = _root.parseColor(_root.submenu_rollover_color);
- this._parent.time_op.textColor = _root.parseColor(_root.submenu_rollover_color);
- this._parent.date_op.textColor = _root.parseColor(_root.submenu_rollover_color);
- var _loc3_ = {x:this._parent.bg_mc._x + this._parent.bg_mc._width - 26,y:0};
- this._parent.localToGlobal(_loc3_);
- local_root_mc.globalToLocal(_loc3_);
- _root.toolTip(_root.my_bm_start_video_desc,local_root_mc,"right",- Math.round(_loc3_.x),- Math.round(_loc3_.y));
- infotext_delay = setTimeout(setBookmarkInfoText,250,this._parent.array_name,this._parent.array_id,this._parent.pd);
- }
- };
- _loc3_.bg_mc.onRollOut = _loc3_.bg_mc.onDragOut = function()
- {
- _root.killToolTip();
- if(!editing_active)
- {
- this._parent.bg_mc._alpha = 0;
- this._parent.text_op.textColor = _root.parseColor(_root.submenu_color);
- this._parent.time_op.textColor = _root.parseColor(_root.submenu_color);
- this._parent.date_op.textColor = _root.parseColor(_root.submenu_color);
- hideBookmarkInfoText();
- }
- };
- _loc3_.edit_btn_mc.onRelease = function()
- {
- _root.killToolTip();
- if(!editing_active)
- {
- selected_bookmark = this._parent;
- this.bg_mc._alpha = 0;
- openBookmarkEditField();
- }
- };
- _loc3_.edit_btn_mc.onRollOver = _loc3_.edit_btn_mc.onDragOver = function()
- {
- if(!editing_active)
- {
- _root.killToolTip();
- var _loc3_ = {x:0,y:0};
- this.localToGlobal(_loc3_);
- local_root_mc.globalToLocal(_loc3_);
- _root.toolTip(_root.edit_bookmark_desc,local_root_mc,"right",- Math.round(_loc3_.x),- Math.round(_loc3_.y));
- this.bg_mc._alpha = Number(_root.submenu_rollover_alpha);
- infotext_delay = setTimeout(setBookmarkInfoText,250,this._parent.array_name,this._parent.array_id);
- }
- };
- _loc3_.edit_btn_mc.onRollOut = _loc3_.edit_btn_mc.onDragOut = function()
- {
- _root.killToolTip();
- this.bg_mc._alpha = 0;
- if(!editing_active)
- {
- hideBookmarkInfoText();
- }
- };
- _loc3_.delete_btn_mc.onRelease = function()
- {
- _root.killToolTip();
- if(!editing_active)
- {
- selected_bookmark = this._parent;
- this.bg_mc._alpha = 0;
- openBookmarkDeleteField();
- }
- };
- _loc3_.delete_btn_mc.onRollOver = _loc3_.delete_btn_mc.onDragOver = function()
- {
- if(!editing_active)
- {
- _root.killToolTip();
- var _loc3_ = {x:0,y:0};
- this.localToGlobal(_loc3_);
- local_root_mc.globalToLocal(_loc3_);
- _root.toolTip(_root.bookmark_del_desc,local_root_mc,"right",- Math.round(_loc3_.x),- Math.round(_loc3_.y));
- this.bg_mc._alpha = Number(_root.submenu_rollover_alpha);
- infotext_delay = setTimeout(setBookmarkInfoText,250,this._parent.array_name,this._parent.array_id);
- }
- };
- _loc3_.delete_btn_mc.onRollOut = _loc3_.delete_btn_mc.onDragOut = function()
- {
- _root.killToolTip();
- this.bg_mc._alpha = 0;
- if(!editing_active)
- {
- hideBookmarkInfoText();
- }
- };
- _loc4_ = _loc4_ + 1;
- }
- _loc10_ += hl_y_dis;
- }
- i++;
- }
- if(_loc15_ == 0)
- {
- subheader_op.text = _root.my_bm_no_bookmarks_desc;
- info_mc.subheader_op.text = "";
- }
- else
- {
- bookmark_holder_mc.attachMovie("headline_mc","dummy",bookmark_holder_mc.getNextHighestDepth());
- bookmark_holder_mc.dummy._y = _loc10_;
- bookmark_holder_mc.dummy.text_op.autoSize = true;
- subheader_op.text = _root.my_bm_desc;
- info_mc.subheader_op.text = _root.my_bm_teaser_info_desc;
- }
- bookmark_holder_mc._visible = true;
- bm_scroller.targetHeight = Math.ceil(bookmark_holder_mc._height);
- bm_scroller.targetWidth = Math.ceil(bookmark_holder_mc._width);
- }
- function removeBookmarks()
- {
- for(var _loc1_ in bookmark_holder_mc)
- {
- bookmark_holder_mc[_loc1_].removeMovieClip();
- }
- bm_scroller.targetHeight = Math.ceil(bookmark_holder_mc._height);
- bm_scroller.targetWidth = Math.ceil(bookmark_holder_mc._width);
- }
- function reRenderBookmark(bm_mc)
- {
- var _loc2_ = v2b_so.data[bm_mc.array_name].bookmarks;
- bm_mc.original_text = _loc2_[selected_bookmark.array_id].description;
- bm_mc.sec = _loc2_[selected_bookmark.array_id].sec;
- bm_mc.text_op.text = bm_mc.original_text;
- bm_mc.text_op.stringCutter_advanced(" ...");
- if(_loc2_[selected_bookmark.array_id].bm_date != undefined)
- {
- bm_mc.date_op.text = _loc2_[selected_bookmark.array_id].bm_date;
- }
- else
- {
- bm_mc.date_op.text = "";
- }
- bm_mc.time_op.text = createTimeString(_loc2_[selected_bookmark.array_id].sec);
- }
- function setBookmarkInfoText(array_name, array_id, pd)
- {
- var _loc2_ = undefined;
- if(pd)
- {
- _loc2_ = _root.pd_bm_object[array_name][array_id];
- }
- else
- {
- _loc2_ = v2b_so.data[array_name].bookmarks[array_id];
- }
- info_mc.bm_header_op.text = _loc2_.description;
- info_mc.bm_text_op._y = Math.round(info_mc.bm_header_op._y + info_mc.bm_header_op._height + 9);
- info_mc.bm_text_op.text = _loc2_.memo;
- if(info_mc.bm_text_op._y + info_mc.bm_text_op._height > parent_container_height - 150)
- {
- info_mc.bm_text_op.autoSize = false;
- info_mc.bm_text_op._height = Math.max(17,parent_container_height - 150 - info_mc.bm_text_op._y);
- }
- info_mc.bm_time_op._y = Math.round(info_mc.bm_text_op._y + info_mc.bm_text_op._height + 18);
- info_mc.bm_time_op.text = createTimeString(_loc2_.sec);
- info_mc.footer_line_mc._y = info_mc.bm_time_op._y + 40;
- info_mc.footer_line_mc._visible = true;
- }
- function hideBookmarkInfoText()
- {
- clearInterval(infotext_delay);
- info_mc.bm_header_op.text = "";
- info_mc.bm_text_op.text = "";
- info_mc.bm_text_op.autoSize = true;
- info_mc.bm_time_op.text = "";
- info_mc.footer_line_mc._visible = false;
- info_mc.bm_text_op._width = 236;
- info_mc.bm_text_bg_mc._visible = false;
- info_mc.bm_header_bg_mc._visible = false;
- info_mc.text_scroller.enabled = false;
- info_mc.text_scroller._visible = false;
- clearInterval(text_scroller_delay);
- }
- function disableBookmarks()
- {
- for(var _loc1_ in bookmark_holder_mc)
- {
- if(bookmark_holder_mc[_loc1_].mc_type == "bookmark")
- {
- bookmark_holder_mc[_loc1_].bg_mc.enabled = false;
- if(bookmark_holder_mc[_loc1_] != selected_bookmark)
- {
- bookmark_holder_mc[_loc1_]._alpha = 30;
- }
- bookmark_holder_mc[_loc1_].delete_btn_mc.enabled = false;
- bookmark_holder_mc[_loc1_].edit_btn_mc.enabled = false;
- }
- else
- {
- bookmark_holder_mc[_loc1_]._alpha = 30;
- }
- }
- }
- function gotoBookmark(movie_id, array_name, array_id, pd)
- {
- var _loc10_ = video_array[movie_id].movie_name;
- var _loc8_ = video_array[movie_id].movie;
- var _loc9_ = video_array[movie_id].chapter_id;
- var _loc3_ = _loc9_.split(".");
- if(_loc3_.length > 0 && isNaN(Number(_loc3_[_loc3_.length - 1])))
- {
- _loc3_.splice(_loc3_.length - 1,1);
- }
- var _loc4_ = _root.cd_content.firstChild;
- if(_loc3_.length > 1)
- {
- var _loc2_ = 0;
- while(_loc2_ < _loc3_.length - 1)
- {
- _loc4_ = _loc4_.childNodes[_loc3_[_loc2_] - 1];
- _loc2_ = _loc2_ + 1;
- }
- }
- var _loc6_ = 0;
- var _loc5_ = undefined;
- if(pd)
- {
- _loc5_ = _root.pd_bm_object[array_name][array_id];
- }
- else
- {
- _loc5_ = v2b_so.data[array_name].bookmarks[array_id];
- }
- if(_loc5_ != undefined)
- {
- _loc6_ = _loc5_.sec;
- }
- _root.renderVideoBookmark(_loc4_,_loc8_,_loc10_,_loc6_);
- }
- function openBookmarkEditField()
- {
- editing_active = true;
- clearInterval(infotext_delay);
- disableBookmarks();
- var _loc4_ = selected_bookmark.array_name;
- var _loc6_ = v2b_so.data[_loc4_].bookmarks;
- var _loc5_ = v2b_so.data[_loc4_].bookmarks[selected_bookmark.array_id];
- info_mc.bm_header_op.text = _loc5_.description;
- info_mc.bm_text_op.text = _loc5_.memo;
- info_mc.bm_header_op.autoSize = false;
- info_mc.bm_header_op._height = 37;
- info_mc.bm_header_op.type = "input";
- info_mc.bm_header_op.maxChars = 100;
- info_mc.bm_header_op.selectable = true;
- info_mc.bm_header_op.textColor = _root.parseColor(_root.form_text_color);
- info_mc.bm_text_op.autoSize = false;
- info_mc.bm_text_op._y = Math.round(info_mc.bm_header_op._y + info_mc.bm_header_op._height + 8);
- info_mc.bm_text_op._height = 156;
- info_mc.bm_text_op._width = 218;
- info_mc.bm_text_op.type = "input";
- info_mc.bm_text_op.maxChars = 500;
- info_mc.bm_text_op.selectable = true;
- info_mc.bm_text_op.textColor = _root.parseColor(_root.form_text_color);
- info_mc.bm_header_bg_mc._x = info_mc.bm_header_op._x - 2;
- info_mc.bm_header_bg_mc._y = info_mc.bm_header_op._y - 3;
- info_mc.bm_header_bg_mc._width = Math.round(info_mc.bm_header_op._width + 4);
- info_mc.bm_header_bg_mc._height = Math.round(info_mc.bm_header_op._height + 4);
- info_mc.bm_header_bg_mc._visible = true;
- info_mc.bm_text_bg_mc._x = info_mc.bm_text_op._x - 2;
- info_mc.bm_text_bg_mc._y = info_mc.bm_text_op._y - 3;
- info_mc.bm_text_bg_mc._width = Math.round(info_mc.bm_text_op._width + 6 + 16);
- info_mc.bm_text_bg_mc._height = Math.round(info_mc.bm_text_op._height + 4);
- info_mc.bm_text_bg_mc._visible = true;
- text_scroller_delay = setTimeout(setTextScoller,200);
- info_mc.bm_time_op._y = Math.round(info_mc.bm_text_op._y + info_mc.bm_text_op._height + 18);
- info_mc.footer_line_mc._y = info_mc.bm_time_op._y + 40;
- info_mc.footer_line_mc._visible = false;
- var _loc2_ = info_mc.attachMovie("movie_navigation_btn","bookmark_save_btn",info_mc.getNextHighestDepth());
- _loc2_._x = info_mc.bm_text_bg_mc._x;
- _loc2_._y = info_mc.footer_line_mc._y;
- _loc2_.text_op.autoSize = true;
- _loc2_.text_op.textColor = _root.parseColor(_root.btn_text_color);
- _loc2_.text_op.text = _root.bookmark_save_button_desc;
- _loc2_.btn_bg_mc._width = Math.round(info_mc.bm_text_bg_mc._width / 2) - 2;
- _loc2_.btn_rollover_mc._width = _loc2_.btn_bg_mc._width;
- _loc2_.btn_pressed_mc._width = _loc2_.btn_bg_mc._width;
- _loc2_.text_op._x = Math.floor((_loc2_.btn_bg_mc._width - _loc2_.text_op.textWidth) / 2) - 2;
- setRGB(_loc2_.btn_rollover_mc,_root.parseColor(_root.btn_rollover_color));
- _loc2_.btn_rollover_mc._alpha = 0;
- _loc2_.btn_pressed_mc._alpha = 0;
- _loc2_.onRelease = bookmarkEditField_onSave;
- _loc2_.onRollOver = _loc2_.onDragOver = navigationButton_onRollOver;
- _loc2_.onRollOut = _loc2_.onDragOut = navigationButton_onRollOut;
- var _loc3_ = info_mc.attachMovie("movie_navigation_btn","bookmark_cancle_btn",info_mc.getNextHighestDepth());
- _loc3_._x = _loc2_._x + _loc2_._width + 2;
- _loc3_._y = info_mc.footer_line_mc._y;
- _loc3_.text_op.autoSize = true;
- _loc3_.text_op.textColor = _root.parseColor(_root.btn_text_color);
- _loc3_.text_op.text = _root.bookmark_cancle_button_desc;
- _loc3_.btn_bg_mc._width = Math.round(info_mc.bm_text_bg_mc._width - _loc2_.btn_bg_mc._width - 2);
- _loc3_.btn_rollover_mc._width = _loc3_.btn_bg_mc._width;
- _loc3_.btn_pressed_mc._width = _loc3_.btn_bg_mc._width;
- _loc3_.text_op._x = Math.floor((_loc3_.btn_bg_mc._width - _loc3_.text_op.textWidth) / 2) - 2;
- setRGB(_loc3_.btn_rollover_mc,_root.parseColor(_root.btn_rollover_color));
- _loc3_.btn_rollover_mc._alpha = 0;
- _loc3_.btn_pressed_mc._alpha = 0;
- _loc3_.onRelease = bookmarkEditField_onClose;
- _loc3_.onRollOver = _loc3_.onDragOver = navigationButton_onRollOver;
- _loc3_.onRollOut = _loc3_.onDragOut = navigationButton_onRollOut;
- }
- function openBookmarkDeleteField()
- {
- editing_active = true;
- clearInterval(infotext_delay);
- disableBookmarks();
- info_mc.footer_line_mc._visible = false;
- info_mc.bm_alert_op._y = info_mc.footer_line_mc._y;
- info_mc.bm_alert_op.autoSize = true;
- info_mc.bm_alert_op.multiline = true;
- info_mc.bm_alert_op.wordWrap = true;
- info_mc.bm_alert_op.text = _root.bookmark_del_question;
- var _loc2_ = info_mc.attachMovie("movie_navigation_btn","bookmark_yes_btn",info_mc.getNextHighestDepth());
- _loc2_._x = info_mc.footer_line_mc._x;
- _loc2_._y = Math.round(info_mc.bm_alert_op._y + info_mc.bm_alert_op.textHeight + 15);
- _loc2_.text_op.autoSize = true;
- _loc2_.text_op.textColor = _root.parseColor(_root.btn_text_color);
- _loc2_.text_op.text = _root.bookmark_del_confirm;
- _loc2_.btn_bg_mc._width = Math.round(info_mc.footer_line_mc._width / 2) - 2;
- _loc2_.btn_rollover_mc._width = _loc2_.btn_bg_mc._width;
- _loc2_.btn_pressed_mc._width = _loc2_.btn_bg_mc._width;
- _loc2_.text_op._x = Math.floor((_loc2_.btn_bg_mc._width - _loc2_.text_op.textWidth) / 2) - 2;
- setRGB(_loc2_.btn_rollover_mc,_root.parseColor(_root.btn_rollover_color));
- _loc2_.btn_rollover_mc._alpha = 0;
- _loc2_.btn_pressed_mc._alpha = 0;
- _loc2_.onRelease = bookmarkEditField_onDelete;
- _loc2_.onRollOver = _loc2_.onDragOver = navigationButton_onRollOver;
- _loc2_.onRollOut = _loc2_.onDragOut = navigationButton_onRollOut;
- var _loc3_ = info_mc.attachMovie("movie_navigation_btn","bookmark_no_btn",info_mc.getNextHighestDepth());
- _loc3_._x = _loc2_._x + _loc2_._width + 2;
- _loc3_._y = _loc2_._y;
- _loc3_.text_op.autoSize = true;
- _loc3_.text_op.textColor = _root.parseColor(_root.btn_text_color);
- _loc3_.text_op.text = _root.bookmark_del_negate;
- _loc3_.btn_bg_mc._width = Math.round(info_mc.footer_line_mc._width - _loc2_.btn_bg_mc._width - 2);
- _loc3_.btn_rollover_mc._width = _loc3_.btn_bg_mc._width;
- _loc3_.btn_pressed_mc._width = _loc3_.btn_bg_mc._width;
- _loc3_.text_op._x = Math.floor((_loc3_.btn_bg_mc._width - _loc3_.text_op.textWidth) / 2) - 2;
- setRGB(_loc3_.btn_rollover_mc,_root.parseColor(_root.btn_rollover_color));
- _loc3_.btn_rollover_mc._alpha = 0;
- _loc3_.btn_pressed_mc._alpha = 0;
- _loc3_.onRelease = bookmarkEditField_onClose;
- _loc3_.onRollOver = _loc3_.onDragOver = navigationButton_onRollOver;
- _loc3_.onRollOut = _loc3_.onDragOut = navigationButton_onRollOut;
- }
- function bookmarkEditField_onSave()
- {
- var _loc2_ = selected_bookmark.array_name;
- var _loc1_ = v2b_so.data[_loc2_].bookmarks;
- if(_loc1_ != undefined && _loc1_[selected_bookmark.array_id].sec == selected_bookmark.sec)
- {
- _loc1_[selected_bookmark.array_id].description = info_mc.bm_header_op.text;
- _loc1_[selected_bookmark.array_id].memo = info_mc.bm_text_op.text;
- _loc1_[selected_bookmark.array_id].bm_date = createDateString(new Date());
- v2b_so.data[_loc2_].bookmarks = _loc1_;
- v2b_so.flush();
- reRenderBookmark(selected_bookmark);
- }
- else
- {
- renderBookmarks();
- }
- bookmarkEditField_onClose();
- }
- function bookmarkEditField_onDelete()
- {
- var _loc2_ = selected_bookmark.array_name;
- var _loc1_ = v2b_so.data[_loc2_].bookmarks;
- if(_loc1_ != undefined && _loc1_[selected_bookmark.array_id].sec == selected_bookmark.sec)
- {
- _loc1_.splice(selected_bookmark.array_id,1);
- v2b_so.data[_loc2_].bookmarks = new Array();
- if(_loc1_.length > 0)
- {
- v2b_so.data[_loc2_].bookmarks = _loc1_;
- }
- v2b_so.flush();
- }
- bookmarkEditField_onClose();
- renderBookmarks();
- }
- function bookmarkEditField_onClose()
- {
- for(var _loc2_ in bookmark_holder_mc)
- {
- if(bookmark_holder_mc[_loc2_].mc_type == "bookmark")
- {
- bookmark_holder_mc[_loc2_].bg_mc.enabled = true;
- bookmark_holder_mc[_loc2_]._alpha = 100;
- bookmark_holder_mc[_loc2_].delete_btn_mc.enabled = true;
- bookmark_holder_mc[_loc2_].edit_btn_mc.enabled = true;
- }
- else
- {
- bookmark_holder_mc[_loc2_]._alpha = 100;
- }
- }
- info_mc.bookmark_cancle_btn.removeMovieClip();
- info_mc.bookmark_save_btn.removeMovieClip();
- info_mc.bookmark_yes_btn.removeMovieClip();
- info_mc.bookmark_no_btn.removeMovieClip();
- hideBookmarkInfoText();
- info_mc.bm_header_op.autoSize = true;
- info_mc.bm_header_op.type = "dynamic";
- info_mc.bm_header_op.background = false;
- info_mc.bm_header_op.textColor = _root.parseColor(_root.teaser_subheader2_color);
- info_mc.bm_header_op.selectable = false;
- info_mc.bm_text_op.autoSize = true;
- info_mc.bm_text_op.type = "dynamic";
- info_mc.bm_text_op.background = false;
- info_mc.bm_text_op.textColor = _root.parseColor(_root.teaser_text_color);
- info_mc.bm_text_op.selectable = false;
- info_mc.bm_alert_op.text = "";
- editing_active = false;
- selected_bookmark = undefined;
- }
- function navigationButton_onRollOver()
- {
- this.btn_rollover_mc._alpha = 100;
- }
- function navigationButton_onRollOut()
- {
- this.btn_rollover_mc._alpha = 0;
- }
- function setVisibility(value)
- {
- if(value)
- {
- renderBookmarks();
- bookmarkEditField_onClose();
- Mouse.removeListener(ftScrollBarMouseListener);
- Mouse.addListener(ftScrollBarMouseListener);
- this._visible = value;
- if(local_setpos_changelog != _root.setpos_changelog)
- {
- setLocalPos();
- }
- }
- else
- {
- bookmarkEditField_onClose();
- Mouse.removeListener(ftScrollBarMouseListener);
- bm_scroller.scrollPercentage = 0;
- this._visible = value;
- }
- }
- function setLocalPos()
- {
- if(local_root_mc._visible)
- {
- if(local_test)
- {
- parent_container_width = Stage.width;
- parent_container_height = Stage.height;
- }
- else
- {
- parent_container_width = _root.content_pos_mc.content_panel_mc._width;
- parent_container_height = _root.content_pos_mc.content_panel_mc._height;
- }
- max_content_width = Math.floor(parent_container_width - info_container_width - 40);
- visible_scroller_height = Math.floor(parent_container_height - bm_scroller._y);
- bm_scroller.viewAreaWidth = parent_container_width - 293;
- bm_scroller.viewAreaHeight = Math.floor(visible_scroller_height);
- bm_scroller._x = parent_container_width - 291;
- bm_scroller.setSize(15,visible_scroller_height - 1);
- info_mc._x = Math.floor(parent_container_width - info_container_width);
- info_mc.info_v_line_mc._height = parent_container_height + 2;
- header_line_mc._width = max_content_width;
- legende_mc._x = Math.round(header_line_mc._x + header_line_mc._width - legende_mc._width);
- header_op._width = legende_mc._x - header_op._x - 20;
- subheader_op._width = legende_mc._x - subheader_op._x - 20;
- for(var _loc2_ in bookmark_holder_mc)
- {
- if(bookmark_holder_mc[_loc2_].mc_type == "headline")
- {
- setHeaderWidth(bookmark_holder_mc[_loc2_],max_content_width);
- }
- else if(bookmark_holder_mc[_loc2_].mc_type == "bookmark")
- {
- setBookmarkWidth(bookmark_holder_mc[_loc2_],max_content_width,true);
- }
- }
- local_setpos_changelog = _root.setpos_changelog;
- }
- }
- function updateScroller()
- {
- if(visible_scroller_height < bookmark_holder_mc._height || bm_scroller.visible)
- {
- bm_scroller.setSize(15,visible_scroller_height - 1);
- }
- }
- function setBookmarkWidth(mc, bm_width, cut_text)
- {
- mc.delete_btn_mc._x = bm_width - 22;
- mc.edit_btn_mc._x = bm_width - 44;
- var _loc2_ = bm_width - 44;
- mc.bg_mc._width = _loc2_;
- mc.play_btn_mc._x = _loc2_ - 22;
- mc.time_op._x = _loc2_ - 110;
- mc.date_op._x = _loc2_ - 220;
- mc.text_op._width = Math.max(0,_loc2_ - 220 - mc.text_op._x - 10);
- if(cut_text)
- {
- mc.text_op.text = mc.original_text;
- clearInterval(mc.cut_delay);
- if(mc.text_op._width > 0)
- {
- mc.cut_delay = setTimeout(mc.text_op,"stringCutter_advanced",200," ...");
- }
- }
- }
- function setHeaderWidth(mc, bm_width, cut_text)
- {
- mc.text_op._width = Math.max(0,bm_width - mc.text_op._x);
- if(cut_text)
- {
- mc.text_op.text = mc.original_text;
- clearInterval(mc.cut_delay);
- if(mc.text_op._width > 0)
- {
- mc.cut_delay = setTimeout(mc.text_op,"stringCutter_advanced",200," ...");
- }
- }
- }
- function createDateString(_date)
- {
- var _loc1_ = "";
- if(_date.getDate() >= 10)
- {
- _loc1_ += String(_date.getDate()) + ".";
- }
- else
- {
- _loc1_ += "0" + String(_date.getDate()) + ".";
- }
- var _loc3_ = _date.getMonth() + 1;
- if(_loc3_ >= 10)
- {
- _loc1_ += String(_loc3_) + ".";
- }
- else
- {
- _loc1_ += "0" + String(_loc3_) + ".";
- }
- _loc1_ += String(_date.getFullYear());
- return _loc1_;
- }
- function createTimeString(_sec)
- {
- var _loc1_ = "";
- var _loc2_ = Math.floor(_sec / 60);
- var _loc3_ = _sec - _loc2_ * 60;
- if(_loc2_ >= 10)
- {
- _loc1_ += String(_loc2_) + ":";
- }
- else
- {
- _loc1_ += "0" + String(_loc2_) + ":";
- }
- if(_loc3_ >= 10)
- {
- _loc1_ += String(_loc3_);
- }
- else
- {
- _loc1_ += "0" + String(_loc3_);
- }
- return _loc1_;
- }
- function setRGB(mc, color)
- {
- var _loc1_ = new flash.geom.ColorTransform();
- _loc1_.rgb = color;
- var _loc2_ = new flash.geom.Transform(mc);
- _loc2_.colorTransform = _loc1_;
- }
- function setBookmarkScrollerVisible()
- {
- bm_scroller._visible = true;
- if(local_setpos_changelog != _root.setpos_changelog)
- {
- setLocalPos();
- }
- bookmark_holder_mc._visible = true;
- }
- function setTextScoller()
- {
- info_mc.text_scroller.enabled = true;
- info_mc.text_scroller._visible = true;
- info_mc.text_scroller._x = info_mc.bm_text_bg_mc._x + info_mc.bm_text_bg_mc._width - 16;
- info_mc.text_scroller._y = info_mc.bm_text_bg_mc._y + 2;
- }
- var local_root_mc = this;
- var local_test = false;
- var contPath = "config/content.xml";
- var video_array = new Array();
- var v2b_so = SharedObject.getLocal(_root.so_name,"/");
- var bm_y_dis = 25;
- var hl_y_dis = 50;
- var show_predefined_bm = true;
- var parent_container_width = 1025;
- var parent_container_heigt = 626;
- var info_container_width = 277;
- var max_content_width = 720;
- var editing_active = false;
- var selected_bookmark;
- var ftScrollBarMouseListener = new Object();
- var visible_scroller_height;
- var local_setpos_changelog = -1;
- var bmPanelListener = new Object();
- info_mc.footer_line_mc._visible = false;
- info_mc.bm_header_op.wordWrap = true;
- info_mc.bm_header_op.autoSize = true;
- info_mc.bmtext_op.wordWrap = true;
- info_mc.bm_text_op.autoSize = true;
- bm_scroller._visible = false;
- info_mc.text_scroller.enabled = false;
- info_mc.text_scroller._visible = false;
- info_mc.bm_text_bg_mc._visible = false;
- info_mc.bm_header_bg_mc._visible = false;
- ftScrollBarMouseListener.onMouseWheel = function(delta, scrollTarget)
- {
- if(local_root_mc._visible && bm_scroller.enabled)
- {
- if(bm_scroller.oSipDWs.hitTest(_root._xmouse,_root._ymouse,false))
- {
- var _loc3_ = Math.floor(parent_container_height - bm_scroller._y);
- var _loc2_ = Math.ceil(100 * bm_y_dis / (bookmark_holder_mc._height - _loc3_));
- if(_loc2_ > 0)
- {
- if(delta < 1)
- {
- bm_scroller.scrollPercentage = Math.min(100,bm_scroller.scrollPercentage + _loc2_);
- }
- else
- {
- bm_scroller.scrollPercentage = Math.max(0,bm_scroller.scrollPercentage - _loc2_);
- }
- }
- }
- }
- };
- Mouse.addListener(ftScrollBarMouseListener);
-